<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="../inclued/base.jsp" %>
<!DOCTYPE HTML>
<html>
<head>
	<meta charset="UTF-8">
	<title></title>
	<link rel="stylesheet" href="../css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="../css/style.css">
	<link rel="stylesheet" href="../css/font-awesome.css">
  <style>
    .content{
       margin-left: 192px; 
       min-height: 700px;
    }
  </style>
</head>
<body>
	<%@ include file="inclued/top.jsp"%>
	<%@ include file="inclued/left.jsp"%>
    <!--right -->
<div class="content">
        
        <div class="header">
           <!--  <div class="stats">
               <p class="stat"><span class="number">53</span>tickets</p>
               <p class="stat"><span class="number">27</span>tasks</p>
               <p class="stat"><span class="number">15</span>waiting</p>
           </div> -->

            <h1 class="page-title">Home</h1>
        </div>
        
        <ul class="breadcrumb">
            <li><a href="login.jspx">Home</a> <span class="divider">/</span></li>
            <li class="active">商品系统<span class="divider">/</span></li>
            <li class="bookType.jspx">类别管理</li>
        </ul>

        <div class="container-fluid">
            <div class="row-fluid">
                <div class="btn-toolbar">
                    <a href="bookTypeAdd.jspx"class="btn btn-primary"><i class="icon-plus"></i> 新类别</a>
                    <button class="btn">从Excel导入</button>
                    <button class="btn">导出为Excel</button>
                 
                </div>
                <c:if test="${not empty sessionScope.error }">
	        		<div class="alert alert-error">
	  					${sessionScope.error }
					</div>
					<c:remove var="error" scope="session"/>
	        	</c:if>
                <div class="well">
                    <table class="table">
                      <thead>
                        <tr>
                          <th>#</th>
                          <th>类别名称</th>
                          <th style="width: 26px;"></th>
                        </tr>
                      </thead>
                      <tbody>
                      
                       <c:forEach items="${page.list}" var="list"  varStatus="vs">
                       		<tr>
                       			<td>${vs.count}</td>
                       			<td>${list.typeName}</td>
	                       			<td>
	                              <a href="edit.jspx?id=${list.id}"><i class="icon-pencil"></i></a>
	                              <a href="bookTypeDel.jspx?id=${list.id}" role="button" data-toggle="modal"><i class="icon-remove"></i></a>
	                          </td>
                       		</tr>
                       </c:forEach>
                        <c:if test="${empty page.list}">
			               <tr> <td colspan="3">你没有添加任何数据</td></tr>
			            </c:if>
                      </tbody>
                    </table>
                 </div>   
                <div class="pagination pull-right">
                <ul>
                <c:if test="${page.totlePage>1}">
                	<c:choose>
					  	<c:when test="${page.pageNum==1}">
					  		<li><a class="diable">首页</a></li>
					  		<li><a class="diable">上一页</a></li>
					  	</c:when>
					  	<c:otherwise>
					  		<li><a href="bookType.jspx?p=1">首页</a></li>
					  		<li><a href="bookType?p=${page.pageNum-1}">上一页</a></li>
					  	</c:otherwise>
					  </c:choose>
					  <c:choose>
					  	<c:when test="${page.pageNum==page.totlePage}">
					  		<li><a class="diable">下一页</a></li>
					  		<li><a class="diable">尾页</a></li>
					  	</c:when>
					  	<c:otherwise>
					  		<li><a href="bookType.jspx?p=${page.pageNum+1}">下一页</a></li>
					  		<li><a href="bookType.jspx?p=${page.totlePage}">尾页</a></li>
					  	</c:otherwise>
					  </c:choose>
                	</c:if>
                	</ul>
                	</div >
	                  
	               
                
                
        


                    
               <footer>
                  <hr>
                  <p>© 2012 <a href="http://weibo.com/u/2821897085?wvr=5&lf=reg" target="_blank">风哥制作</a></p>
              </footer>
                    
            </div>
        </div>
    </div>


	<script type="text/javascript" src="../js/jquery.js"></script>
	<script type="text/javascript" src="../js/bootstrap.min.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){

		});
	</script>
</body>
</html>